<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name, age) {
            this.name = name
            this.age = age
        }
        Person.prototype.sayHi = function () { console.log('Hello World~') }

        class Student extends Person {
            constructor (gender, name, age) {
                super(name, age)
                this.gender = gender
            }
            study () {
                console.log('study~')
            }
        }
        const s = new Student('女', 'Rose', 19)
        console.log(s)
        s.study()
    </script>
</body>
</html>